Skip to content

Implement native_api hook along with LSPlt #8

Merged
JingMatrix merged 4 commits into
masterfrom
lsplt
Aug 30, 2024
Merged

Implement native_api hook along with LSPlt #8
JingMatrix merged 4 commits into
masterfrom
lsplt

Conversation

@JingMatrix
Copy link
Copy Markdown
Owner

Currently, we can use LSPlt to do inline hook for symbols in libart.so.
However, /linker is treated as an invalid ELF in LSPlt.
We thus need to modify LSPlt.

Moreover, to be more efficient, we should avoid looking up symbols twice (LSPosed and LSPlt both implement elf_utils).

@JingMatrix
Copy link
Copy Markdown
Owner Author

It turns out that we should

  1. Use LSPlt for libart inline-hook since it also supports riscv arch
  2. Use Dobby for native_api inline-hook since it supports general ELF files other than just shared libraries (which is the case for LSPlt).

@JingMatrix JingMatrix marked this pull request as ready for review August 30, 2024 14:59
@JingMatrix JingMatrix changed the title Implement native_api hook with LSPlt Implement native_api hook along with LSPlt Aug 30, 2024
@JingMatrix JingMatrix force-pushed the lsplt branch 2 times, most recently from 66d3644 to e4288c7 Compare August 30, 2024 18:23
JingMatrix and others added 4 commits August 30, 2024 20:36
It remains to implement HookFunction and UnhookFunction with LSPlt
Co-authored-by: Stillhard <indofreeserver@yahoo.co.id>
LSPlt might not be capable for general native_api hooks
LSPlt is only used to hook libart symbols.
The file `native_util.h` is reformatted by clangd.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant